#ifndef DEVICE_H
#define DEVICE_H

#include <QObject>
#include "qextserialport.h"
#include "Measure.h"

#include <datareceiver.h>
#include <QDateTime>



class Device : public QObject
{
    Q_OBJECT
    QextSerialPort m_port;

    MeasureList m_measureList;


public:
    explicit Device(QObject *parent = 0);

    bool IsOpen();
    bool open(const QString &port);
    const MeasureList& measureList();

    DataReceiver m_receiver;

    void SetConfig(QDateTime date,uint8_t refresh);
signals:
    void DataReady();

public slots:
    void onDataReady();
    void Obtain();

};

#endif // DEVICE_H
